//package xcmg.device.web.delivery;
//
//import io.swagger.annotations.ApiImplicitParam;
//import io.swagger.annotations.ApiImplicitParams;
//import io.swagger.annotations.ApiOperation;
//import org.apache.commons.collections.CollectionUtils;
//import org.apache.commons.lang.StringUtils;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.validation.annotation.Validated;
//import org.springframework.web.bind.annotation.GetMapping;
//import org.springframework.web.bind.annotation.RequestBody;
//import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.bind.annotation.RequestMethod;
//import org.springframework.web.bind.annotation.RequestParam;
//import org.springframework.web.bind.annotation.ResponseBody;
//import org.springframework.web.bind.annotation.RestController;
//import org.springframework.web.multipart.MultipartFile;
//import org.springframework.web.multipart.MultipartHttpServletRequest;
//import xcmg.device.dao.entity.SendMethodDictionaryDO;
//import xcmg.device.infra.AuthCode;
//import xcmg.device.infra.BasicController;
//import xcmg.device.infra.ErrorCode;
//import xcmg.device.infra.annotation.ExternalApiRequest;
//import xcmg.device.infra.enums.DeliveryReceiptEnum;
//import xcmg.device.service.abnormal.AbnormalOutService;
//import xcmg.device.service.audit.DeliveryReceiptAuditService;
//import xcmg.device.service.basic.SendMethodDictionaryService;
//import xcmg.device.service.crm.util.ActionResultUtil;
//import xcmg.device.service.delivery.DeliveryNoteService;
//import xcmg.device.service.delivery.DeliveryReceiptExpressService;
//import xcmg.device.service.delivery.DeliveryReceiptMaterialService;
//import xcmg.device.service.delivery.DeliveryReceiptService;
//import xcmg.device.service.threeGuaranteesPur.ThreeGuaranteesOutService;
//import xcmg.device.service.vo.boxup.BoxupMainVO;
//import xcmg.device.service.vo.delivery.AutoDeliveryReceiptVO;
//import xcmg.device.service.vo.delivery.BillDetailArrivalTimeAndBackFactoryDeitVO;
//import xcmg.device.service.vo.delivery.BillDetailArrivalTimeEditVO;
//import xcmg.device.service.vo.delivery.BusinessOrderAuditParamVO;
//import xcmg.device.service.vo.delivery.DeliveryReceipt4AutoVO;
//import xcmg.device.service.vo.delivery.DeliveryReceiptDetailVO;
//import xcmg.device.service.vo.delivery.DeliveryReceiptQueryParam;
//import xcmg.device.service.vo.delivery.DeliveryReceiptVO;
//import xcmg.device.service.vo.delivery.ExpressSearchParam;
//import xcmg.device.service.vo.delivery.OperateDeliveryReceiptVO;
//import xcmg.device.service.vo.delivery.OutBillItemVO;
//import xcmg.device.service.vo.delivery.OutBillParamVO;
//import xcmg.device.service.vo.delivery.PrintDeliveryReceiptVO;
//import xcmg.device.service.vo.delivery.billMaterialsParamVO;
//import xcmg.device.service.vo.warehouse.DeliveryReceiptInVO;
//import xcmg.device.service.warehouse.allot.RegionAllotService;
//import yb.ecp.fast.infra.annotation.FastMappingInfo;
//import yb.ecp.fast.infra.infra.ActionResult;
//import yb.ecp.fast.infra.infra.PageCommonVO;
//import yb.ecp.fast.infra.infra.SearchCommonVO;
//import yb.ecp.fast.infra.infra.log.LogHelper;
//
//import javax.servlet.http.HttpServletRequest;
//import java.math.BigDecimal;
//import java.text.SimpleDateFormat;
//import java.util.ArrayList;
//import java.util.Arrays;
//import java.util.List;
//
///**
// * Created by sqq on 2018/1/13.
// */
//@RestController
//@RequestMapping("/deliveryReceipt")
//public class DeliveryReceiptController extends BasicController {
//    @Autowired
//    private SendMethodDictionaryService sendMethodDictionaryService;
//
//    @Autowired
//    private DeliveryReceiptService deliveryReceiptService;
//    @Autowired
//    private DeliveryReceiptAuditService deliveryReceiptAuditService;
//
//    @Autowired
//    private DeliveryReceiptMaterialService deliveryReceiptMaterialService;
//
//    @Autowired
//    private DeliveryReceiptExpressService deliveryReceiptExpressService;
//
//    @Autowired
//    private ThreeGuaranteesOutService threeGuaranteesOutService;
//
//    @Autowired
//    private DeliveryNoteService deliveryNoteService;
//
//    @Autowired
//    private RegionAllotService regionAllotService;
//
//    @Autowired
//    private AbnormalOutService abnormalOutService;
//
//    @RequestMapping(value = "/submit", method = RequestMethod.POST)
//    @FastMappingInfo(needLogin = true)
//    public ActionResult submit(@RequestBody OperateDeliveryReceiptVO operateDeliveryReceiptVO) throws Exception {
//        operateDeliveryReceiptVO.getDeliveryReceiptVO().setOrgId(getOrgId());
//        operateDeliveryReceiptVO.getDeliveryReceiptVO().setCreateId(getUserId());
//        operateDeliveryReceiptVO.getDeliveryReceiptVO().setUpdateId(getUserId());
//        ActionResult result = deliveryReceiptService.add(operateDeliveryReceiptVO);
//        return result;
//    }
//
//    @RequestMapping(value = "/update", method = RequestMethod.POST)
//    @FastMappingInfo(needLogin = true)
//    public ActionResult update(@RequestBody OperateDeliveryReceiptVO operateDeliveryReceiptVO) throws Exception {
//        operateDeliveryReceiptVO.getDeliveryReceiptVO().setUpdateId(getUserId());
//        //请求参数预处理
//        String orgId = getOrgId();
//        updateDeliveryParamPreHandle(operateDeliveryReceiptVO, orgId);
//        ErrorCode code = deliveryReceiptService.update(operateDeliveryReceiptVO);
//        return actionResult(code);
//    }
//
//    /**
//     * @Des 编辑发运交接单参数预处理
//     * @Date 2020/11/18 8:33
//     * @Author wangzhaoyu
//     * @Param [operateDeliveryReceiptVO]
//     * @Return void
//     */
//    public void updateDeliveryParamPreHandle(OperateDeliveryReceiptVO operateDeliveryReceiptVO, String orgId) {
//        DeliveryReceiptVO deliveryReceiptVO = operateDeliveryReceiptVO.getDeliveryReceiptVO();
//        if (deliveryReceiptVO == null) {
//            return;
//        }
//        String shippingMethod = deliveryReceiptVO.getShippingMethod();//一级发运方式描述
//        String shippingMethodId = deliveryReceiptVO.getShippingMethodId();//一级发运方式key
//        //发运方式描述（一级）赋值
//        if (StringUtils.isEmpty(shippingMethod) && !StringUtils.isEmpty(shippingMethodId)) {
//            List<SendMethodDictionaryDO> sendMethods = sendMethodDictionaryService.item(orgId, "0", shippingMethodId);
//            if (!CollectionUtils.isEmpty(sendMethods)) {
//                shippingMethod = sendMethods.get(0).getName();
//                operateDeliveryReceiptVO.getDeliveryReceiptVO().setShippingMethod(shippingMethod);
//            }
//        }
//    }
//
//    @RequestMapping(value = "/updateLogsic", method = RequestMethod.POST)
//    @FastMappingInfo(needLogin = true)
//    public ActionResult update(@RequestBody DeliveryReceiptVO operateDeliveryReceiptVO) throws Exception {
//        ErrorCode code = deliveryReceiptService.updateLogsic(operateDeliveryReceiptVO);
//        return actionResult(code);
//    }
//
//    @RequestMapping(value = "/list", method = RequestMethod.POST)
//    @FastMappingInfo(needLogin = true)
//    public ActionResult list(@RequestBody SearchCommonVO<DeliveryReceiptQueryParam> condition) throws Exception {
//        DeliveryReceiptQueryParam queryParam = condition.getFilters();
//        if (queryParam == null) {
//            queryParam = new DeliveryReceiptQueryParam();
//        }
//        String orgId = getOrgId();
//        String userId = getUserId();
//        queryParam.setOrgId(getOrgId());
//        condition.setFilters(queryParam);
//        String deptId = getDeptId();
//        PageCommonVO pageCommonVO = deliveryReceiptService.list(condition, orgId, deptId, userId);
//        return actionResult(pageCommonVO.getPageInfo());
//    }
//
//    @RequestMapping(value = "/outBillList", method = RequestMethod.POST)
//    @FastMappingInfo(needLogin = true)
//    @ApiOperation(value = "新增发运单，选择出库单列表", response = OutBillParamVO.class)
//    @ApiImplicitParams({
//            @ApiImplicitParam(name = "billType", value = "单据类型", required = true, paramType = "query"),
//            @ApiImplicitParam(name = "warehouseCode", value = "仓库编码"),
//            @ApiImplicitParam(name = "keyWords", value = "关键字")
//    })
//    public ActionResult outBillList(@RequestBody SearchCommonVO<OutBillParamVO> condition) throws Exception {
//        PageCommonVO pageCommonVO = deliveryReceiptService.outBillList(condition, getOrgId(), getDeptId());
//        return actionResult(pageCommonVO.getPageInfo());
//    }
//
//    @RequestMapping(value = "/threeDayPlanBillList", method = RequestMethod.POST)
//    @FastMappingInfo(needLogin = true)
//    @ApiOperation(value = "新增发运单，选择三日计划出库单列表", response = OutBillParamVO.class)
//    public ActionResult threeDayPlanBillList(@RequestBody SearchCommonVO<OutBillParamVO> condition) throws Exception {
//        PageCommonVO pageCommonVO = deliveryReceiptService.threeDayPlanBillList(condition, getOrgId());
//        return actionResult(pageCommonVO.getPageInfo());
//    }
//
//    @RequestMapping(value = "/outBillItem", method = RequestMethod.GET)
//    @FastMappingInfo(needLogin = true)
//    public ActionResult outBillItem(String id, String billType) {
//        OutBillItemVO outBillItemVO = deliveryReceiptService.OutBillItem(id, billType);
//        return actionResult(outBillItemVO);
//    }
//
//    @RequestMapping(value = "/getMaterialsInfo", method = RequestMethod.GET)
//    @FastMappingInfo(needLogin = true)
//    public ActionResult getMaterialsInfo(String id) throws Exception {
//        DeliveryReceiptInVO deliveryReceiptInVO = deliveryReceiptService.getMaterialsInfo(id, getOrgId());
//        return actionResult(deliveryReceiptInVO);
//    }
//
//    @RequestMapping(value = "/item", method = RequestMethod.GET)
//    @FastMappingInfo(needLogin = true)
//    public ActionResult item(String billId) {
//        OperateDeliveryReceiptVO operateDeliveryReceiptVO = deliveryReceiptService.getInfo(billId);
//        return actionResult(operateDeliveryReceiptVO);
//    }
//
//    @RequestMapping(value = "/export", method = RequestMethod.POST)
//    @FastMappingInfo(needLogin = true)
//    public void export(String[] billIds) throws Exception {
//        deliveryReceiptService.export(Arrays.asList(billIds), getOrgId());
//    }
//
//    @RequestMapping(value = "/exportAll", method = RequestMethod.POST)
//    @FastMappingInfo(needLogin = true)
//    public void exportAll(DeliveryReceiptQueryParam condition) throws Exception {
//        condition.setOrgId(getOrgId());
//        condition.setCreateOrgId(getOrgId());
//        deliveryReceiptService.exportAll(condition, getUserId(), getDeptId(), getOrgId());
//    }
//
//    @RequestMapping(value = "/shipConfirm", method = RequestMethod.POST)
//    @FastMappingInfo(needLogin = true)
//    public ActionResult shipConfirm(@RequestBody DeliveryReceiptVO deliveryReceiptVO) throws Exception {
//        ErrorCode code = deliveryReceiptService.shipConfirm(deliveryReceiptVO.getBillNo(), getOrgId(), getUserId());
//        return actionResult(code);
//    }
//
//    @RequestMapping(value = "/batchShipConfirm", method = RequestMethod.POST)
//    @FastMappingInfo(needLogin = true)
//    public ActionResult batchShipConfirm(@RequestBody List<DeliveryReceiptVO> deliveryReceiptVOList) throws Exception {
//        StringBuilder errorMsg = new StringBuilder();
//        for (DeliveryReceiptVO deliveryReceiptVO : deliveryReceiptVOList) {
//            ErrorCode errorCode = deliveryReceiptService.shipConfirm(deliveryReceiptVO.getBillNo(), getOrgId(), getUserId());
//            if (errorCode.getCode() != ErrorCode.Success.getCode()) {
//                String msg = "【" + deliveryReceiptVO.getBillNo() + "】" + errorCode.getDesc() + ";";
//                errorMsg.append(msg);
//            }
//        }
//
//        if (errorMsg.length() == 0) {
//            return actionResult(ErrorCode.Success);
//        }
//
//        return actionResult(ErrorCode.Failure, errorMsg.toString());
//    }
//
//
//    @RequestMapping(value = "/confirmReceipt", method = RequestMethod.POST)
//    @FastMappingInfo(needLogin = true)
//    public ActionResult confirmReceipt(@RequestBody DeliveryReceiptVO deliveryReceiptVO) throws Exception {
//        ErrorCode code = deliveryReceiptService.confirmReceipt(deliveryReceiptVO, DeliveryReceiptEnum.DeliveryStatus.Received.toString());
//        return actionResult(code);
//    }
//
//    @RequestMapping(value = "/refusedReceipt", method = RequestMethod.POST)
//    @FastMappingInfo(needLogin = true)
//    public ActionResult refusedReceipt(@RequestBody DeliveryReceiptVO deliveryReceiptVO) throws Exception {
//        ErrorCode code = deliveryReceiptService.confirmReceipt(deliveryReceiptVO, DeliveryReceiptEnum.DeliveryStatus.RefusedReceived.toString());
//        return actionResult(code);
//    }
//
//    @RequestMapping(value = "/detalList", method = RequestMethod.GET)
//    @FastMappingInfo(needLogin = true)
//    public ActionResult detalList(String deliveryReceiptNo) throws Exception {
//        List<DeliveryReceiptDetailVO> results = deliveryReceiptService.detalList(deliveryReceiptNo, getOrgId());
//        return actionResult(results);
//    }
//
//    @RequestMapping(value = "/boxupList", method = RequestMethod.GET)
//    @FastMappingInfo(needLogin = true)
//    public ActionResult boxupList(String deliveryReceiptNo) throws Exception {
//        List<BoxupMainVO> results = deliveryReceiptService.boxupList(deliveryReceiptNo, getOrgId());
//        return actionResult(results);
//    }
//
//    @RequestMapping(value = "/moreBillDetail", method = RequestMethod.POST)
//    @FastMappingInfo(needLogin = true)
//    @ApiOperation(value = "关联单据详情", response = billMaterialsParamVO.class)
//    @ApiImplicitParams({
//            @ApiImplicitParam(name = "billType", value = "单据类型", required = true, paramType = "query"),
//            @ApiImplicitParam(name = "deliveryBillId", value = "关键字")
//    })
//    public ActionResult moreBillDetail(@RequestBody SearchCommonVO<billMaterialsParamVO> condition) throws Exception {
//        PageCommonVO pageCommonVO = deliveryReceiptService.moreBillDetail(condition);
//        return actionResult(pageCommonVO.getPageInfo());
//    }
//
//
//    @RequestMapping(value = "billDetail/edit", method = RequestMethod.POST)
//    @FastMappingInfo(needLogin = true)
//    @ApiOperation(value = "发运交接单->关联详情->到货时间，备注编辑")
//    public ActionResult outDetailEdit(@RequestBody BillDetailArrivalTimeAndBackFactoryDeitVO editVO) {
//        //
//        String billType = editVO.getBillType();
//        if (StringUtils.isEmpty(billType)) {
//            return actionResult(ErrorCode.Success);
//        }
//        switch (billType) {
//            //三包出库，目前只处理三包出库
//            case "XGSC":
//                deliveryReceiptService.arrivalTimeAndRemarkEdit(editVO);
//                break;
//        }
//        return actionResult(ErrorCode.Success);
//    }
//
//    @RequestMapping(value = "billDetail/arrivalTime/edit", method = RequestMethod.POST)
//    @FastMappingInfo(needLogin = true)
//    @ApiOperation(value = "发运交接单->关联详情->到货时间编辑")
//    public ActionResult outDetailArrivalTimeEdit(@RequestBody BillDetailArrivalTimeEditVO editVO) {
//        //
//        String billType = editVO.getBillType();
//        if (StringUtils.isEmpty(billType)) {
//            return actionResult(ErrorCode.Success);
//        }
//        switch (billType) {
//            //三包出库，目前只处理三包出库
//            case "XGSC":
//                deliveryReceiptService.threeGuaranteesOutArrivalTimeEdit(editVO);
//                break;
//        }
//        return actionResult(ErrorCode.Success);
//    }
//
//    @RequestMapping(value = "/exportBillDetail", method = RequestMethod.POST)
//    @FastMappingInfo(needLogin = true, code = AuthCode.HandoverBill.EXPORT)
//    public void exportBillDetail(billMaterialsParamVO condition) throws Exception {
//        deliveryReceiptService.exportBillDetail(condition);
//    }
//
//    @RequestMapping(value = "/billNoByNoteNo", method = RequestMethod.GET)
//    @FastMappingInfo(needLogin = true)
//    public ActionResult billNoByNoteNo(String deliveryNoteNo) {
//        if (StringUtils.isEmpty(deliveryNoteNo)) {
//            return actionResult(ErrorCode.IllegalArument);
//        }
//        return actionResult(ErrorCode.Success, deliveryReceiptService.billNoByNoteNo(deliveryNoteNo));
//    }
//
//    @RequestMapping(value = "/materialsList", method = RequestMethod.GET)
//    @FastMappingInfo(needLogin = true)
//    public ActionResult materialsList(String receiptId) throws Exception {
//        if (StringUtils.isEmpty(receiptId)) {
//            return actionResult(ErrorCode.IllegalArument);
//        }
//        return actionResult(ErrorCode.Success, deliveryReceiptMaterialService.list(receiptId, getOrgId()));
//    }
//
//    @RequestMapping(value = "/remove", method = RequestMethod.POST)
//    @FastMappingInfo(needLogin = true)
//    public ActionResult remove(@RequestBody DeliveryReceiptVO deliveryReceiptVO) throws Exception {
//        try {
//            return actionResult(deliveryReceiptService.delete(deliveryReceiptVO.getId()));
//        } catch (Exception e) {
//            return new ActionResult(ErrorCode.Failure.getCode(), e.getMessage());
//        }
//    }
//
//    @RequestMapping(value = "/exportAllNew", method = RequestMethod.POST)
//    @FastMappingInfo(needLogin = true, code = AuthCode.HandoverBill.EXPORT)
//    public void exportAllNew(DeliveryReceiptVO condition) throws Exception {
//        condition.setOrgId(getOrgId());
//        condition.setCreateOrgId(getOrgId());
//        String deptId = getDeptId();
//        deliveryReceiptService.exportAllNew(condition, getUserId(), deptId);
//    }
//
//    @ResponseBody
//    @RequestMapping(value = "/uploadAttach", method = RequestMethod.POST)
//    @FastMappingInfo(needLogin = true)
//    public ActionResult uploadAttach(HttpServletRequest request) throws Exception {
//        MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
//        MultipartFile file = multipartRequest.getFile(multipartRequest.getFileNames().next());
//        return actionResult(deliveryReceiptService.uploadAttach(file, request.getParameter("x-billId")));
//    }
//
//    @RequestMapping(value = "/downloadAttach", method = RequestMethod.GET)
//    @FastMappingInfo(needLogin = true)
//    public void downloadAttach(String id) throws Exception {
//        deliveryReceiptService.downloadAttach(id);
//    }
//
//    @RequestMapping(value = "/getExpressInfo", method = RequestMethod.GET)
//    @FastMappingInfo(needLogin = true)
//    public ActionResult getExpressInfo(@RequestParam("deliveryReceiptNo") String deliveryReceiptNo) {
//        ErrorCode result;
//        try {
//            ExpressSearchParam searchParam = new ExpressSearchParam();
//            searchParam.setOrgId(getOrgId());
//            searchParam.setDeliveryReceiptNo(deliveryReceiptNo);
//            result = deliveryReceiptExpressService.getDeliveryReceiptExpressInfo(searchParam);
//        } catch (Exception e) {
//            LogHelper.fatal("DeliveryReceiptController#getExpressInfo is error.", e);
//            return new ActionResult<>(ErrorCode.Failure.getCode(), e.getMessage());
//        }
//        return actionResult(result);
//    }
//
//    @RequestMapping(value = "/listActivesExpress", method = RequestMethod.GET)
//    @FastMappingInfo(needLogin = true)
//    public ActionResult listActivesExpress() {
//        return actionResult(deliveryReceiptExpressService.listActivesExpress());
//    }
//
//    /**
//     * 获取所有启用的物流商支持编号名称模糊查询
//     *
//     * @param condition 关键字
//     * @return
//     */
//    @RequestMapping(value = "/listAllActives", method = RequestMethod.POST)
//    @FastMappingInfo(needLogin = true)
//    public ActionResult listAllActives(@RequestBody SearchCommonVO<String> condition) {
//        PageCommonVO pageCommonVO = deliveryReceiptExpressService.listAllActives(condition);
//        return actionResult(pageCommonVO.getPageInfo());
//    }
//
//    @RequestMapping(value = "/getOrderTraces", method = RequestMethod.POST)
//    @FastMappingInfo(needLogin = true)
//    public ActionResult getOrderTraces(@RequestBody ExpressSearchParam searchParam) throws Exception {
//        String orderTraces = deliveryReceiptExpressService.getOrderTraces(searchParam);
//        return actionResult(orderTraces);
//    }
//
//    @RequestMapping(value = "/listStatusByPurchaseNo", method = RequestMethod.GET)
//    @ExternalApiRequest
//    public ActionResult listStatusByPurchaseNo(String purchaseNo, String sapCode) {
//        try {
//            return actionResult(deliveryReceiptService.listStatusByPurchaseNo(purchaseNo, sapCode));
//        } catch (Exception e) {
//            return new ActionResult(ErrorCode.Failure.getCode(), e.getMessage());
//        }
//    }
//
//    @RequestMapping(value = "/updateArrivalDate", method = RequestMethod.GET)
//    @FastMappingInfo(needLogin = true)
//    public ActionResult updateArrivalDate(String id, String arrivalDate) throws Exception {
//        if (StringUtils.isBlank(id) || StringUtils.isBlank(arrivalDate)) {
//            return actionResult(ErrorCode.Failure, "主键或者时间不能为空");
//        }
//        try {
//            SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
//            deliveryReceiptService.updateArrivalDate(id, sdf.parse(arrivalDate));
//        } catch (Exception e) {
//            return actionResult(ErrorCode.Failure, e.getMessage());
//        }
//        return actionResult(ErrorCode.Success);
//    }
//
//    @RequestMapping(value = "/itemList", method = {RequestMethod.POST, RequestMethod.GET})
//    @FastMappingInfo(needLogin = true)
//    public ActionResult itemList(String[] billIds) {
//        List<OperateDeliveryReceiptVO> operateDeliveryReceiptVOList = new ArrayList<>();
//        for (String billId : billIds) {
//            operateDeliveryReceiptVOList.add(deliveryReceiptService.getInfo(billId));
//        }
//        return actionResult(operateDeliveryReceiptVOList);
//    }
//
//    @RequestMapping(value = "/list4MaterialInfo", method = {RequestMethod.POST, RequestMethod.GET})
//    @FastMappingInfo(needLogin = true)
//    public ActionResult list4MaterialInfo(String[] billNos, String billType) {
//        if (billType.equals("XGSC")) {
//            return actionResult(threeGuaranteesOutService.getMaterialInfoByNo(Arrays.asList(billNos)));
//        }
//        if (billType.equals("XGFT")) {
//            return actionResult(deliveryNoteService.getMaterialInfoByDeliveryNo(Arrays.asList(billNos)));
//        }
//        if (billType.equals("XGFC")) {
//            return actionResult(abnormalOutService.getMaterialInfoByNo(Arrays.asList(billNos)));
//        }
//        if (billType.equals("XGQD")) {
//            return actionResult(regionAllotService.getMaterialInfoByNo(Arrays.asList(billNos)));
//        }
//        return actionResult(new ArrayList<>());
//    }
//
//    @GetMapping("/list4ExpressInfo")
//    public ActionResult list4ExpressInfo(String serviceNo, String receiverName, String receiverTel) {
//        return actionResult(deliveryReceiptService.list4ExpressInfo(serviceNo, receiverName, receiverTel));
//    }
//
//    /**
//     * 获取运费
//     *
//     * @param logisticsBasicId
//     * @param totalWeight
//     * @return
//     */
//    @GetMapping("/getFreight")
//    public ActionResult getFreight(String logisticsBasicId, BigDecimal totalWeight) {
//        return actionResult(deliveryReceiptService.getFreight(logisticsBasicId, totalWeight));
//    }
//
//    /**
//     * 进出口打印装箱清单
//     *
//     * @param billId
//     * @return
//     */
//    @RequestMapping(value = "/item4Print", method = RequestMethod.GET)
//    @FastMappingInfo(needLogin = true)
//    @ApiOperation(value = "进出口装箱清单详情")
//    public ActionResult item4Print(@RequestParam("billId") String billId) throws Exception {
//        List<PrintDeliveryReceiptVO> receiptVOList = deliveryReceiptService.item4Print(billId);
//        return actionResult(receiptVOList);
//    }
//
//    /**
//     * 批量打印进出口装箱清单
//     *
//     * @param billId
//     * @return
//     */
//    @ApiImplicitParam(name = "billIdList", value = "发运交接单ID数组", required = true, paramType = "query", allowMultiple = true, dataType = "String")
//    @RequestMapping(value = "/batch4Print", method = RequestMethod.GET)
//    @FastMappingInfo(needLogin = true)
//    @ApiOperation(value = "批量打印进出口装箱清单")
//    public ActionResult item4Print(@RequestParam(name = "billIdList") List<String> billIdList) throws Exception {
//        if (CollectionUtils.isEmpty(billIdList)) {
//            return actionResult(ErrorCode.Failure, "发运交接单不能为空");
//        }
//        String orgId = getOrgId();
//        List<PrintDeliveryReceiptVO> receiptVOList = deliveryReceiptService.batch4Print(billIdList, orgId);
//        return actionResult(receiptVOList);
//    }
//
//    /**
//     * 进出口发运交接单(国内)
//     *
//     * @param condition
//     * @return
//     * @throws Exception
//     */
//    @RequestMapping(value = "/list4JckDomestic", method = RequestMethod.POST)
//    @FastMappingInfo(needLogin = true)
//    public ActionResult list4JckDomestic(@RequestBody SearchCommonVO<DeliveryReceiptQueryParam> condition) throws Exception {
//        DeliveryReceiptQueryParam queryParam = condition.getFilters();
//        if (queryParam == null) {
//            queryParam = new DeliveryReceiptQueryParam();
//        }
//        String orgId = getOrgId();
//        String userId = getUserId();
//        queryParam.setOrgId(orgId);
//        condition.setFilters(queryParam);
//        String deptId = getDeptId();
//        PageCommonVO pageCommonVO = deliveryReceiptService.list4JckDomestic(condition, orgId, deptId, userId);
//        return actionResult(pageCommonVO.getPageInfo());
//    }
//
//    /**
//     * 同步装箱信息
//     * 对自动新增的进出口运单，从对应的发运交接单中同步装箱信息到进出口运单
//     *
//     * @param billNo 进出口运单号
//     * @param billId 进出口运单ID
//     * @return 同步结果
//     */
//    @RequestMapping(value = "/syncPackInfo", method = RequestMethod.GET)
//    @FastMappingInfo(needLogin = true)
//    public ActionResult syncPackInfo(@RequestParam("billNo") String billNo, @RequestParam("billId") String billId) throws Exception {
//        return actionResult(deliveryReceiptService.syncPackInfo(billNo, billId, getOrgId(), getUserId(), getUserName()));
//    }
//
//    /**
//     * 进出口运单（国外）
//     *
//     * @param condition
//     * @return
//     * @throws Exception
//     */
//    @RequestMapping(value = "/list4JckOverseas", method = RequestMethod.POST)
//    @FastMappingInfo(needLogin = true)
//    public ActionResult list4JckOverseas(@RequestBody SearchCommonVO<DeliveryReceiptQueryParam> condition) throws Exception {
//        DeliveryReceiptQueryParam queryParam = condition.getFilters();
//        if (queryParam == null) {
//            queryParam = new DeliveryReceiptQueryParam();
//        }
//        String orgId = getOrgId();
//        String userId = getUserId();
//        queryParam.setOrgId(orgId);
//        condition.setFilters(queryParam);
//        String deptId = getDeptId();
//        PageCommonVO pageCommonVO = deliveryReceiptService.list4JckOverseas(condition, orgId, deptId, userId);
//        return actionResult(pageCommonVO.getPageInfo());
//    }
//
//
//    /**
//     * 自动新增进出口运单
//     *
//     * @param autoDeliveryReceiptVO
//     * @return
//     * @throws Exception
//     */
//    @RequestMapping(value = "/autoAdd", method = RequestMethod.POST)
//    @FastMappingInfo(needLogin = true)
//    public ActionResult autoAdd(@RequestBody @Validated AutoDeliveryReceiptVO autoDeliveryReceiptVO) throws Exception {
//
//        if (StringUtils.isEmpty(autoDeliveryReceiptVO.getBillNo())) {
//            return actionResult(ErrorCode.Failure, "发运交接单不能为空");
//        }
//
//        String userId = getUserId();
//        String orgId = getOrgId();
//        ActionResult result = deliveryReceiptService.autoAdd(autoDeliveryReceiptVO, userId, orgId);
//        return result;
//    }
//
//    /**
//     * @param billId
//     * @return
//     */
//    @RequestMapping(value = "/item4Auto", method = RequestMethod.GET)
//    @FastMappingInfo(needLogin = true)
//    public ActionResult item4Auto(@RequestParam("billId") String billId) {
//        DeliveryReceipt4AutoVO autoVO = deliveryReceiptService.item4Auto(billId);
//        return actionResult(autoVO);
//    }
//
//    /**
//     * 同步装箱明细
//     *
//     * @param id
//     * @return
//     * @throws Exception
//     */
//    @RequestMapping(value = "/syncDelivery4NS", method = RequestMethod.GET)
//    @FastMappingInfo(needLogin = true)
//    public ActionResult syncDelivery4NS(@RequestParam("billId") String billId) throws Exception {
//        if (StringUtils.isEmpty(billId)) {
//            return actionResult(ErrorCode.IllegalArument);
//        }
//
//        return actionResult(deliveryReceiptService.syncDelivery4NS(billId));
//    }
//
//    @RequestMapping(value = "/getPrintBoxupInfo", method = RequestMethod.GET)
//    @FastMappingInfo(needLogin = true)
//    public ActionResult getPrintBoxupInfo(String billId) throws Exception {
//        return actionResult(deliveryReceiptService.getPrintBoxupInfo(billId));
//    }
//
//    @RequestMapping(value = "/getSinglePrintBoxupInfo", method = RequestMethod.GET)
//    public ActionResult getSinglePrintBoxupInfo(String boxupId) throws Exception {
//        return actionResult(deliveryReceiptService.getSinglePrintBoxupInfo(boxupId));
//    }
//
//    /**
//     * @Des 发运交接单审核通过
//     * @Date 2021/4/13 15:13
//     * @Author wangzhaoyu
//     * @Param [param]
//     * @Return yb.ecp.fast.infra.infra.ActionResult
//     */
//    @RequestMapping(value = "/auditPass", method = RequestMethod.POST)
//    public ActionResult auditPass(@RequestBody BusinessOrderAuditParamVO param) {
//        String userId = getUserId();
//        String userName = getUserName();
//        try {
//            ActionResult auditResult = deliveryReceiptAuditService.audit(param, userId, userName, true);
//            return auditResult;
//        } catch (Exception e) {
//            return ActionResultUtil.errorActionResult(ErrorCode.Failure.getCode(), e.getMessage());
//        }
//    }
//
//
//    /**
//     * @Des 发运交接单审核通过
//     * @Date 2021/4/13 15:13
//     * @Author wangzhaoyu
//     * @Param [param]
//     * @Return yb.ecp.fast.infra.infra.ActionResult
//     */
//    @RequestMapping(value = "/auditReject", method = RequestMethod.POST)
//    public ActionResult auditReject(@RequestBody BusinessOrderAuditParamVO param) {
//        String userId = getUserId();
//        String userName = getUserName();
//        try {
//            ActionResult auditResult = deliveryReceiptAuditService.audit(param, userId, userName, false);
//            return auditResult;
//        } catch (Exception e) {
//            return ActionResultUtil.errorActionResult(ErrorCode.Failure.getCode(), e.getMessage());
//        }
//    }
//
//    /**
//     * @Des 主页面板查看发运交接单待审核数量
//     * @Date 2021/4/13 17:18
//     * @Author wangzhaoyu
//     * @Param []
//     * @Return yb.ecp.fast.infra.infra.ActionResult
//     */
//    @FastMappingInfo(needLogin = true)
//    @RequestMapping(value = "/mainBoardWaitAudit", method = RequestMethod.GET)
//    public ActionResult mainBoardWaitAudit() throws Exception {
//        String orgId = getOrgId();
//        try {
//            Integer result = deliveryReceiptService.countWaitAuditData(orgId);
//            return ActionResultUtil.successActionResult(result);
//        } catch (Exception e) {
//            return ActionResultUtil.successActionResult(0);
//        }
//    }
//}
